<?php

require '../../claroline/inc/claro_init_global.inc.php';
require_once './lib/C2IPRAT.lib.php';

// Gestion requete AJAX
if ($_POST['fonction'])
{
	foreach ($_POST as $key=>$param)
	{
		$_POST[$key] = utf8_decode($param);
	}
	
	$feedback = call_user_func($_POST['fonction']);
	
	if (is_array($feedback))
	{
		print_r($feedback);
	}
	else
	echo utf8_decode($feedback);
	
	exit;
}
?>
